<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

  <head>
    
    <title>form.jsp</title>

	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
    <form action='${blog==null?'/blog/submit':'/blog/update' }' method="post">
    <input type="hidden" name="blog.id" value="${blog.id }">
    <div>
    <label>标题</label>
    <input type="text" name="blog.title" value="${blog.title }" placeholder="输入标题"> 
    </div>
    <div>
    <label>性别</label>
    <input type="radio"  name="blog.sex" <c:if test="${blog.sex!=null && blog.sex==1 }">checked="checked"</c:if>  value="1" >男
    <input type="radio"  name="blog.sex" <c:if test="${blog.sex!=null && blog.sex==2 }">checked="checked"</c:if> value="2" > 女
    </div>
    <div>
    <label>内容</label>
    <textarea  name="blog.content" placeholder="输入内容">${blog.content }</textarea>
    </div>
    <div>
    <input type="submit" value="提交" > 
    </div>
    </form>
  </body>
